﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Cosmetic.Logic;

public partial class Controls_NewBlog : System.Web.UI.UserControl
{
	private BlogManager m_BlogManager	= new BlogManager();

	protected void Page_Load(object sender, EventArgs e)
	{
		this.BindBlog();
	}

	private void BindBlog()
	{
		this.lvBlog.DataSource	= this.m_BlogManager.GetAllBlog().OrderByDescending(theBlog=>theBlog.CreateTime).Take(5).ToList();
		
		this.lvBlog.DataBind();
	}
}
